#include <bits/stdc++.h>
using namespace std;

#define LOCAL

#ifdef LOCAL
template<typename T>
void err(T v) {
    cerr << v << endl;
}

void err() {
    cerr << endl;
}
template<typename T, typename... A>
void err(T v, A... args) {
    cerr << v << ", ";
    err(args...);
}
#define dbg(x...) { cerr << #x << " -> "; err(x);}

#else
#define dbg(...)

#endif

const int N = 2e5+50;
int n, t;


int main() {
    scanf("%d", &t);
    for (int kk=0; kk<t; ++kk) {
        int n, m;
        scanf("%d%d", &n, &m);
        for (int i=0; i<n; ++i) {
            for (int j=0; j<m; ++j) {
                if (i+j == 0) {
                    printf("W");
                } else
                    printf("B");
            }
            puts("");
        }
    }
    return 0;
}